#include <ros/ros.h>
#include <sound_play/sound_play.h>

class SoundTester {
public:
	ros::NodeHandle nh_;
	sound_play::SoundClient sc;

	SoundTester(): nh_("~"), sc(nh_, "/robotsound") {};
	~SoundTester() {
		nh_.shutdown();
	}
	void init() {
	}
	void sleepok(int t, ros::NodeHandle &nh) {
		if (nh.ok()) {
			sleep(t);
		}
	}
};

int main(int argc, char** argv) {
	ros::init(argc, argv, "SoundTester");

	SoundTester st;
	st.init();

	st.sc.playWave("~/ros/robophant/comm/sounds/AlloIkBenOllie.wav");
	st.sleepok(2,st.nh_);

	ros::Duration(10.0).sleep();
	return 0;
}
